/**
 * MIT License
 *
 * Copyright (C) 2023 Huawei Device Co., Ltd.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

#include "Props.h"
#include <react/renderer/core/PropsParserContext.h>
#include <react/renderer/core/propsConversions.h>

namespace facebook {
    namespace react {

        RNCClipPathViewProps::RNCClipPathViewProps(const PropsParserContext &context,
                                                   const RNCClipPathViewProps &sourceProps, const RawProps &rawProps)
            : ViewProps(context, sourceProps, rawProps),
              opacity(convertRawProp(context, rawProps, "opacity", sourceProps.opacity, 1.0f)),
              d(convertRawProp(context, rawProps, "d", sourceProps.d, "/0")),
              opacityStatus(convertRawProp(context, rawProps, "opacityStatus", sourceProps.opacityStatus, false)),
              mask(convertRawProp(context, rawProps, "mask", sourceProps.mask, "/0")),
              oldMask(convertRawProp(context, rawProps, "oldMask", sourceProps.oldMask, "/0")),
              fillColor(convertRawProp(context, rawProps, "fillColor", sourceProps.fillColor, {0x000000})),
              fillColorStatus(convertRawProp(context, rawProps, "fillColorStatus", sourceProps.fillColorStatus, false)),
              fillOpacity(convertRawProp(context, rawProps, "fillOpacity", sourceProps.fillOpacity, 1.0f)),
              fillOpacityStatus(
                  convertRawProp(context, rawProps, "fillOpacityStatus", sourceProps.fillOpacityStatus, false)),
              fillRule(convertRawProp(context, rawProps, "fillRule", sourceProps.fillRule, "/0")),
              fillRuleStatus(convertRawProp(context, rawProps, "fillRuleStatus", sourceProps.fillRuleStatus, false)),

              strokeColor(convertRawProp(context, rawProps, "strokeColor", sourceProps.strokeColor, {0x00000000})),
              strokeColorStatus(
                  convertRawProp(context, rawProps, "strokeColorStatus", sourceProps.strokeColorStatus, {false})),
              strokeOpacity(convertRawProp(context, rawProps, "strokeOpacity", sourceProps.strokeOpacity, {1.0})),
              strokeOpacityStatus(
                  convertRawProp(context, rawProps, "strokeOpacityStatus", sourceProps.strokeOpacityStatus, {false})),
              strokeWidth(convertRawProp(context, rawProps, "strokeWidth", sourceProps.strokeWidth, {1.0})),
              strokeWidthStatus(
                  convertRawProp(context, rawProps, "strokeWidthStatus", sourceProps.strokeWidthStatus, {false})),
              strokeCap(convertRawProp(context, rawProps, "strokeCap", sourceProps.strokeCap, {"none"})),
              strokeJoin(convertRawProp(context, rawProps, "strokeJoin", sourceProps.strokeJoin, {"none"})),
              strokeMiter(convertRawProp(context, rawProps, "strokeMiter", sourceProps.strokeMiter, {4.0})),
              strokeMiterStatus(
                  convertRawProp(context, rawProps, "strokeMiterStatus", sourceProps.strokeMiterStatus, {false})),
              strokeStart(convertRawProp(context, rawProps, "strokeStart", sourceProps.strokeStart, {0.0})),
              strokeStartStatus(
                  convertRawProp(context, rawProps, "strokeStartStatus", sourceProps.strokeStartStatus, {false})),
              strokeEnd(convertRawProp(context, rawProps, "strokeEnd", sourceProps.strokeEnd, {1.0})),
              strokeEndStatus(
                  convertRawProp(context, rawProps, "strokeEndStatus", sourceProps.strokeEndStatus, {false})),

              shadowColor(convertRawProp(context, rawProps, "shadowColor", sourceProps.shadowColor, {0x000000})),
              shadowColorStatus(
                  convertRawProp(context, rawProps, "shadowColorStatus", sourceProps.shadowColorStatus, {false})),
              shadowOpacity(convertRawProp(context, rawProps, "shadowOpacity", sourceProps.shadowOpacity, {0.0})),
              shadowOpacityStatus(
                  convertRawProp(context, rawProps, "shadowOpacityStatus", sourceProps.shadowOpacityStatus, {false})),
              shadowRadius(convertRawProp(context, rawProps, "shadowRadius", sourceProps.shadowRadius, {2.0})),
              shadowRadiusStatus(
                  convertRawProp(context, rawProps, "shadowRadiusStatus", sourceProps.shadowRadiusStatus, {false})),
              shadowOffsetX(convertRawProp(context, rawProps, "shadowOffsetX", sourceProps.shadowOffsetX, {2.0})),
              shadowOffsetY(convertRawProp(context, rawProps, "shadowOffsetY", sourceProps.shadowOffsetY, {2.0})),
              shadowOffsetIsPercent(convertRawProp(context, rawProps, "shadowOffsetIsPercent",
                                                   sourceProps.shadowOffsetIsPercent, {false})),
              shadowOffsetStatus(
                  convertRawProp(context, rawProps, "shadowOffsetStatus", sourceProps.shadowOffsetStatus, {false})),

              translationX(convertRawProp(context, rawProps, "translationX", sourceProps.translationX, {0.0})),
              translationY(convertRawProp(context, rawProps, "translationY", sourceProps.translationY, {0.0})),
              translationIsPercent(
                  convertRawProp(context, rawProps, "translationIsPercent", sourceProps.translationIsPercent, {false})),
              rotation(convertRawProp(context, rawProps, "rotation", sourceProps.rotation, {0.0})),
              rotationOx(convertRawProp(context, rawProps, "rotationOx", sourceProps.rotationOx, {0.0})),
              rotationOy(convertRawProp(context, rawProps, "rotationOy", sourceProps.rotationOy, {0.0})),
              rotationIsPercent(
                  convertRawProp(context, rawProps, "rotationIsPercent", sourceProps.rotationIsPercent, {false})),
              scale(convertRawProp(context, rawProps, "scale", sourceProps.scale, {1.0})),
              scaleX(convertRawProp(context, rawProps, "scaleX", sourceProps.scaleX, {1.0})),
              scaleY(convertRawProp(context, rawProps, "scaleY", sourceProps.scaleY, {1.0})),
              scaleOrigin(convertRawProp(context, rawProps, "scaleOrigin", sourceProps.scaleOrigin, {0.0})),
              scaleOriginX(convertRawProp(context, rawProps, "scaleOriginX", sourceProps.scaleOriginX, {0.0})),
              scaleOriginY(convertRawProp(context, rawProps, "scaleOriginY", sourceProps.scaleOriginY, {0.0})),
              scaleIsPercent(convertRawProp(context, rawProps, "scaleIsPercent", sourceProps.scaleIsPercent, {false})),
              bgColor(convertRawProp(context, rawProps, "bgColor", sourceProps.bgColor, {0x00000000})),
              align(convertRawProp(context, rawProps, "align", sourceProps.align, {"xMidYMid"}))

{}
    } // namespace react
} // namespace facebook